package com.kyin.satoken.controller;

import com.kyin.satoken.common.R;
import com.kyin.satoken.service.MagicApiService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author yin.kai
 * @ClassName MagicApiController
 * @description: 类描述
 * @date 2025/9/22 15:01
 * @version: 1.0
 */
@RestController
@RequestMapping("/server")
public class MagicApiController {

    @Resource
    private MagicApiService magicApiService;

    @GetMapping("/getReq")
    public R getReq(@RequestParam Map<String ,Object> params) throws Exception {
        return  magicApiService.getRequest(params);
    }
    @PostMapping("/postReq")
    public R postReq(@RequestBody Map<String ,Object> params) throws Exception{
       return magicApiService.postRequest(params);
    }

}
